Mobile devices are more likely to be used for accessing internet in comparison with other electronic devices providing access to the internet. Accessing internet through Smartphone is common and providing a reasonable battery life is one of the important pre-requisites of Smartphone users. According to various experiments and data, it is verified that the power consumed by a cellular radio contributes around 33 to 50% of complete battery usage for all Smartphone users.
Generally in TCP, retransmission of data packets occur due to packet loss, which is caused by the poor network conditions, poor channel conditions such as congestion, signal degradation, link failure between routers, or the like. However, retransmission of the TCP closure packet i.e., TCP FIN, can occur in optimal network conditions. Considering an example of TCP FIN retransmission in electronic devices, in which a user is browsing through the electronic device and has opened multiple pre-installed applications such as Social Networking Site (SNS) application, instant messaging applications, browser application, or the like. In this scenario, if the user suddenly receives a voice call, the voice call gets priority and all the applications which were running are left idle in background until the voice call is completed. When any one of these applications comes to foreground again, as the user resumes the activity, the application tries to close all idle connections. These delayed closures lead to many uncontrolled TCP FIN packet retransmissions which results in battery drain.
A fully active wireless radio interface consumes significant amount of power, so the transition between different power states such as idle, active, and standby is important when the radio interface is not in use. A waiting or tail time is maintained between two states to prevent a signaling overhead due to frequent radio state switches. A transmission or reception of one packet causes 10˜30 seconds of Radio Frequency (RF) active state (power-tail), which consumes large amount of current (150˜300 mA) and about 20˜30 signaling messages to setup the connection.
In the electronic device, when an application closes the electronic device's socket, the associated connection is not immediately terminated from the lower layers. The underlying library layer tries to reuse the same TCP connection without notifying the application. The main reason for not releasing the socket immediately is to avoid connection establishment overhead such as: TCP three way handshakes, slow start, Secure Socket Layer (SSL) handshake, or the like. Similarly, the server initiated closure is not immediately notified to the application after kernel has received the FIN packet. Hence, the TCP socket closures are not transparent to the application in the electronic device. However, the same behavior of non-transparency is avoided when the application is actively sending or receiving the data.
During delayed closure from the client, if the arrival of the closure packets from the client exceeds the server timeout, the server discards the client closure packets without sending any acknowledgement/RST (reset). This initiates the client to send repeated FIN/SSL closure packets periodically, irrelevant of network conditions thus creating signaling overhead and enabling the radio for a longer duration.
When the application in the electronic device is idle for a period exceeding the server timeout, the server closes the TCP connection. The server closure is not immediately notified to the application. The application realizes the server closure when the application becomes active on the socket. Further, the application releases the application's socket resource with some delay. Thereafter, the TCP kernel in the electronic device sends delayed FIN packets to the server, in order to complete the TCP flow. When the delayed FIN packets reach the server, the server released the socket resources already. Hence, the FIN packets are silently discarded by the server, without sending any RST packet to avoid any wrong interpretation at the electronic device end. This keeps the radio interface in the active state for a longer time and consumes significant amount of battery power as shown in FIG. 1. In case of wired networks, this scenario is tolerable since there is a minor impact in terms of signaling and resource overhead. However, the power loss due to the TCP FIN packets is significant in case of wireless or a cellular network.
Retransmission of TCP zero window probe packets occur when the data download or upload is intervened abruptly from the application. In TCP, the data flow between the client and the server is controlled through a TCP window size. The client and the server exchange their buffer size through the TCP window size. When the client tries to terminate the data flow without terminating the connection, TCP advertises TCP's window size as zero. Further, the server stops sending further data to the client. If the client is inactive after the zero window detection, the server starts sending probe packets periodically and afterwards closes the connection by sending FIN/RST. This creates unnecessary power drain by waking up the radio to send the probe packets from the server.
The above information is presented as background only to help the reader for understanding the present disclosure. Applicants have made no determination and make no assertion as to whether any of the above might be applicable as Prior Art with regard to the present application.